#TTOP_SUB_FLAG 		= SUB_SUB
#export TTOP_SUB_FLAG

include ../config.local
include $(RULESDIR)/config_comm
include ./head.rules
include $(RULESDIR)/rule.local

DEMOSRCS    = $(wildcard *.cpp)

DEMOOBJS    :=  $(DEMOSRCS:%.cpp=%.o)

DEMOTARGET	:= $(TARGETDIR)/bin/ec_dev_demo

all: $(DEMOTARGET)

$(DEMOOBJS): %.o :%.cpp
	@echo "ARCHDEF="$(ARCHDEF)
	@echo " CC $<"
	$(CC) -c $(CFLAGS) -o $@ $<

$(DEMOTARGET):$(DEMOOBJS)
	@echo "Building Targets....."

	$(CC) $(CXXFLAGS) -Wall -o $(DEMOTARGET) $(DEMOOBJS) $(applibs-y)
	$(STRIP) $(DEMOTARGET)

	/bin/cp ../run.sh $(TARGETDIR)/bin/
	/bin/cp ../ec_drv_it8733/ec_drv_it8733.ko $(TARGETDIR)/bin/
	/bin/cp ../ec_drv_it8528/ec_drv_it8528.ko $(TARGETDIR)/bin/


clean: 
	/bin/rm -f *.o $(DEMOTARGET) #$(NFSTARGET)

